function serviceCostRule(ticketType, amount) {
  // 定义不同票种的服务费率
  const serviceFees = {
    'A级票': 50, 
    'B级票': 40,     
    'C级票': 30,
	'D级票':20,
	'VIP票':70,
  };

  // 检查票种是否有效
  if (!serviceFees[ticketType]) {
    throw new Error('Invalid ticket type');
  }

  // 计算总服务费
  const totalServiceCost = serviceFees[ticketType] * amount;
  return totalServiceCost;
}

export default serviceCostRule;
